import 'package:flutter/material.dart';

class MyApp23 extends StatefulWidget {
  const MyApp23({super.key});

  @override
  State<MyApp23> createState() => _MyApp23State();
}

class _MyApp23State extends State<MyApp23> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          '第二个界面',
          style: TextStyle(fontSize: 30, color: Colors.white),
        ),
        backgroundColor: Colors.red,
        centerTitle: true,
      ),
      body: Container(
        width: 300,
        height: 200,
        child: ElevatedButton(
          onPressed: () {
            Navigator.pop(context);
          },
          child: Text('返回上一页'),
        ),
      ),
    );
  }
}
